package com.bobo.house.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.bobo.house.domain.Classify;
import com.bobo.house.domain.Company;
import com.bobo.house.vo.CompanyVO;


public interface CompanyMapper {
	
	/**
	 * 
	 * @Title: deleteCompany 
	 * @Description: 删除公司
	 * @param id
	 * @return
	 * @return: int
	 */
	int deleteCompany(Integer id);
	/**
	 * 
	 * @Title: deleteMiddle 
	 * @Description: 根据公司id删除中间表
	 * @param companyId
	 * @return
	 * @return: int
	 */
	int deleteMiddle(Integer companyId);
	/**
	 * 
	 * @Title: selectTotal 
	 * @Description: 概览查询
	 * @return
	 * @return: Company
	 */
	Company selectTotal();
	
	
	/**
	 * 
	 * @Title: selectsClassify 
	 * @Description: 查询类别
	 * @return
	 * @return: List<Classify>
	 */
	List<Classify> selectsClassify();
	
	/**
	 * 
	 * @Title: selects 
	 * @Description: 列表查询
	 * @param companyVO
	 * @return
	 * @return: List<Company>
	 */
	List<Company> selects(CompanyVO companyVO);
	

	/**
	 * 
	 * @Title: insertBatch 
	 * @Description:增加
	 * @param list
	 * @return
	 * @return: int
	 */
	int insert(Company company);
	
	/**
	 * 
	 * @Title: insertMiddle 
	 * @Description: 中间表
	 * @param id 公司id
	 * @param cid 类型id
	 * @return
	 * @return: int
	 */
	int insertMiddle(@Param("id")Integer id,@Param("cid") Integer cid);
	/**
	 * 
	 * @Title: selectCidByName 
	 * @Description: 根据类型名称查询类型id
	 * @param cid
	 * @return
	 * @return: int
	 */
	int selectCidByName(String cname);
}
